# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>

pkgname=libplacebo
pkgver=0.5.0
pkgrel=1
pkgdesc='Reusable library for GPU-accelerated video/image rendering primitives'
url='https://github.com/haasn/libplacebo'
arch=('x86_64')
license=('LGPL2.1')
depends=('vulkan-icd-loader')
makedepends=('meson' 'ninja' 'vulkan-headers')
source=(${pkgname}-${pkgver}.tar.gz::https://github.com/haasn/libplacebo/archive/v${pkgver}.tar.gz)
sha512sums=('af9d3c67dba60c42929f66230aebbc6815c087faf15cc3de9b245a47721fb419a8126ae2baf1423985bfc0052649793810b0beb75622b191c624e84bdfe60296')

build() {
  cd ${pkgbase}-${pkgver}
  arch-meson build \
    -D tests=true \
    -D vulkan=true
  ninja -C build
}

check() {
  cd ${pkgbase}-${pkgver}
  ninja -C build test
}

package() {
  cd ${pkgbase}-${pkgver}
  DESTDIR="${pkgdir}" ninja -C build install
  install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
}

# vim: ts=2 sw=2 et:
